#!/usr/bin/env python
#coding:utf8

"""
课堂上一些练习、代码
"""


li = [2, 1, 4, 7, 5, 8, 10, 1, 11, 91, 20, 21, 1, 4, 5, 8, 10]

# 冒泡
for n in xrange(len(li)):
    for j in xrange(n+1, len(li)):
        if li[n] > li[j]:
        	li[n], li[j] = li[j], li[n]

if __name__ == '__main__':
	print(li)        # result: [1, 1, 1, 2, 4, 4, 5, 5, 7, 8, 8, 10, 10, 11, 20, 21, 91]